function toTwo(n) {
    return n < 10 ? '0' + n : '' + n
}
exports.getNowDate = function() {
    var date = new Date();
    let sign1 = "-";
    let sign2 = ":";
    let year = date.getFullYear() // 年
    let month = date.getMonth() + 1; // 月
    let day = date.getDate(); // 日
    let hour = date.getHours(); // 时
    let minutes = date.getMinutes(); // 分
    let seconds = date.getSeconds() //秒
    let weekArr = ['星期天', '星期一', '星期二', '星期三', '星期四', '星期五', '星期六'];
    let week = weekArr[date.getDay()];

    var currentdate = year + '-' + toTwo(month) + '-' + toTwo(day) + " " + toTwo(hour) + ':' + toTwo(minutes) + ':' + toTwo(seconds) + " " + week
    return currentdate
}